<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class User_model extends Model{
    function User_model(){
        parent::Model();
    }
    
    function get_user_details($username){
        
        $this->db->where('username', $username);
        $query = $this->db->get('users');
        $this->db->where('username', $username);
        $query_2 = $this->db->get('team_members');
        if ($query->num_rows() == 1 && $query_2->num_rows() == 1) {
            
            foreach($query->result_array() as $row){
                $result['details'] = $row;
                
            }
            foreach($query_2->result_array() as $row2){
                $result['members'] = $row2;
                
            }
            return $result;
        } else {
            return false;
        }
    }
}
?>
